@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --td-bg-color-container: transparent;
  --ant-menu-horizontal-item-selected-color: #ffa018;
}

@layer base {
  img {
    display: block;
    max-width: max-content;
  }
}

@layer components {
  .footer-label {
    @apply text-black leading-[25px] text-[20px] font-medium mb-[8px];
  }

  .footer-desc {
    @apply text-[#B2C0CD] leading-[30px] text-[16px] font-medium;
  }

  .btn-more {
    @apply mt-[50px] w-[143px] h-[42px] transition-all hover:-translate-y-1 rounded-[10px] border-[1px] border-solid border-[#2E9BF9] leading-[42px] text-[#2E9BF9] text-center;
  }

  .btn-hover {
    @apply transition-all hover:-translate-y-1 cursor-pointer;
  }
}

.answer-item {
  position: relative;

  &::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50px;
    width: 16px;
    height: 16px;
    background: #ffa018;

    opacity: 0.3;
  }

  &::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 46px;
    width: 16px;
    height: 16px;
    background: #ffa018;
  }
}

.home-part__logo {
  position: relative;
  &::before {
    position: absolute;
    content: "";
    width: 99px;
    height: 99px;
    border-radius: 50%;
    border: 6px solid #ffbc18;
    left: -25px;
    top: -28px;
    z-index: 0;
  }
}

.ant-menu-item,
.ant-menu-submenu-title {
  color: #333;
  line-height: 90px;
  font-weight: 400;
  font-size: 24px;
}

.ant-menu-submenu-selected .ant-menu-submenu-title {
  color: var(--ant-menu-horizontal-item-selected-color) !important;
}

.ant-menu-submenu-selected {
  &::after {
    border-bottom-color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;
  }
}
.ant-menu-item-selected {
  color: var(--ant-menu-horizontal-item-selected-color) !important;

  &::after {
    border-bottom-color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;
  }
}

/* 修改 Menu 项的 hover 状态颜色 */
.ant-menu-item:hover {
  /* background-color: #e6f7ff !important; */
  color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;           /* 悬停字体颜色 */
  
  &::after {
    border-bottom-color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;
  }
}

/* 修改 Menu 项的选中状态颜色 */
.ant-menu-item-selected {
  /* background-color: #1890ff !important;  */
  color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;            /* 选中字体颜色 */
}

/* 如果需要修改子菜单项的 hover 和选中状态 */
.ant-menu-submenu-title:hover {
  /* background-color: #e6f7ff !important; */
  color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;

  &::after {
    border-bottom-color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;
  }
}

.ant-menu-submenu:hover {
  /* background-color: #e6f7ff !important; */
  color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;

  &::after {
    border-bottom-color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;
  }
}

.ant-menu-submenu-selected {
  /* background-color: #1890ff !important; */
  color: var(
      --ant-menu-horizontal-item-selected-color
    ) !important;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

html,
body {
  overflow-x: hidden;
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}
